-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support nativeTarget to build Scala Native static/shared libraries #2196
Conversation
modules/options/src/main/scala/scala/build/options/ScalaNativeOptions.scala
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks promising to me, and I would be happy to merge it. Unfortunately, there is one new test that is failing. You can find more details here.
To fix the checks
and reference-doc
jobs, run the following commands before pushing your changes:
./mill -i __.fix
./mill -i generate-reference-doc.run
modules/cli/src/main/scala/scala/cli/commands/package0/Package.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/package0/Package.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/package0/Package.scala
Outdated
Show resolved
Hide resolved
@lwronski, thanks, that's exactly the commands I was looking for :) If you are happy with the overall approach I will start fixing and cleaning up the PR |
Yes, I'm satisfied with the overall approach, so I will wait for the final results. |
modules/cli/src/main/scala/scala/cli/commands/package0/Package.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/shared/SharedOptions.scala
Outdated
Show resolved
Hide resolved
@keynmol what is the current status on this? can we unblock you somehow? |
Hey @Gedochao! I didn't forget about this PR, just was short on time. I resolved the conflicts (but incorrectly it seems, I will address those failures).
Just as I was writing those last two paragraphs I found the linux equivalent option 🤦 I'll pick this up again and hopefully will address remaining test failures. |
modules/integration/src/test/scala/scala/cli/integration/PackageTestDefinitions.scala
Outdated
Show resolved
Hide resolved
modules/integration/src/test/scala/scala/cli/integration/PackageTestDefinitions.scala
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/shared/SharedOptions.scala
Show resolved
Hide resolved
f30c1c5
to
c17c9a1
Compare
modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaNative.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/shared/ScalaNativeOptions.scala
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Maciej Gajek <[email protected]>
🎉 Thanks @Gedochao and @MaciejG604 |
Scala Native CLI supports building dynamic and shared libraries using
--build-target
argument.So far it hasn't been supported. This PR adds the support, by
-Wl,install_name
argument to rename the library inside its own metadata, otherwise it points to.scala-build/project_asdkljadljk190/main
- instead oftest.dylib
that we want